package com.bosssoft.hr.train.springmvc.example.controller;

import com.bosssoft.hr.train.springmvc.example.model.User;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
public class ValidController {
    @PostMapping("/valid")
    public User valid(@RequestBody @Valid User user){
        return user;
    }
}
